x86/altp2m: use __get_gfn_type_access to avoid lock conflicts
authorTamas K Lengyel <tamas.lengyel@zentific.com>
Wed, 7 Sep 2016 10:33:57 +0000 (12:33 +0200)
committerJan Beulich <jbeulich@suse.com>
Wed, 7 Sep 2016 10:33:57 +0000 (12:33 +0200)
commit021b242dc872f72f6c2ac0a421b1e6d87d62113e
tree0557a6b2b4d89d7f83c1e40fa131963077fba462
parenta66765eb06f057f134f5adc9bdf5c0f2ca00e524
x86/altp2m: use __get_gfn_type_access to avoid lock conflicts

Use __get_gfn_type_access instead of get_gfn_type_access when checking
the hostp2m entries during altp2m mem_access setting and gfn remapping
to avoid a lock conflict which can make dom0 freeze. During mem_access
setting the hp2m is already locked. For gfn remapping we change the flow
to lock the hp2m before locking the ap2m.

Signed-off-by: Tamas K Lengyel <tamas.lengyel@zentific.com>
Reviewed-by: Razvan Cojocaru <rcojocaru@bitdefender.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Acked-by: George Dunlap <george.dunlap@citrix.com>
xen/arch/x86/mm/p2m.c